<?php


namespace App\Transformers\User;


use App\Models\UserFriends;
use League\Fractal\TransformerAbstract;

class UserFriendsTransformer extends TransformerAbstract
{
    public function transform(UserFriends $userFriends)
    {
        return [
            'id' => $userFriends->id,
            'user_id'=>$userFriends->user_id ?? '',
            'friends_uid'=>$userFriends->friends_uid ?? '',
            'created_at' => $userFriends->created_at ? $userFriends->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $userFriends->updated_at ? $userFriends->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }
}
